using System;
using System.Collections.Generic;
using System.Text;
using System.Collections.ObjectModel;
using WozLib.UI.Ink;
using WozLib.WozObjects;

namespace WozLib.UI.Ink
{
  public class WozScreenCollection : ObservableCollection<WozScreen>
  {
    public WozScreenCollection()
    {
    }
  }

  public class WozScreen : SketchPad
  {
    /// <summary>
    /// Creates a new WozScreen at 1000x1400 and a description of "new screen".
    /// </summary>
    public WozScreen() : this (1000,1400) {}

    /// <summary>
    /// Creates a new WozScreen at the specified dimensions and a description of "new screen".
    /// </summary>
    /// <param name="width">width of the screen</param>
    /// <param name="height">height of the screen</param>
    public WozScreen(double width, double height) : this (width,height,"new view") {}

    /// <summary>
    /// Creates a new WozScreen at the specified dimensions and with the specified description.
    /// </summary>
    /// <param name="width">width of the screen</param>
    /// <param name="height">height of the screen</param>
    /// <param name="description">a description of the screen... used as the title</param>
    public WozScreen(double width, double height, string description)
    {
      Width = width;
      Height = height;
      Description = description;
    }

    public static WozScreen FromScreenServerObject(ScreenServerObject screenServerObject)
    {
      WozScreen wozScreen = new WozScreen();

      wozScreen.UpdateWithSketchPadServerObject(screenServerObject);

      return wozScreen;
    }

    public override ServerObject GetServerObject()
    {
      return new ScreenServerObject(this.ServerID);
    }
  }
}
